Reducing impact of clock drift in wireless devices

ABSTRACT

Described are systems and methods for obtaining synchronization at a clock maintained at a wireless device having a respective clock drift. The wireless device may obtain one or more messages indicating two or more clock errors corresponding to two more access points. The wireless device may then establish communication with an access point corresponding to the smallest clock error of the two or more clock errors by synchronizing the clock maintained at the wireless device based on the smallest clock error.

CROSS-REFERENCE TO RELATED APPLICATIONS

This patent application is a continuation of U.S. patent applicationSer. No. 14/185,660, entitled “REDUCING IMPACT OF CLOCK DRIFT INWIRELESS DEVICES”, filed Feb. 20, 2014, which claims the benefit of U.S.Provisional Application No. 61/772,933, entitled “REDUCING IMPACT OFCLOCK DRIFT IN WIRELESS DEVICES,” filed Mar. 5, 2013, assigned to theassignee hereof, and expressly incorporated herein by reference in itsentirety.

FIELD OF DISCLOSURE

Disclosed embodiments are directed to improving precision in positioningand location based applications. More particularly, exemplaryembodiments are directed to reduction of the effect of clock drift inwireless devices configured according to IEEE 802.11 standards in orderto enhance precision and reduce error in wireless communication systems.

BACKGROUND

Wireless communication systems can include wireless devices and accesspoints (APs).

The wireless devices can be configured as mobile stations (STAs) whichcan communicate between one another or through the APs. Standards suchas IEEE 802.11ac, 802.11ad, 802.11v, etc are commonly used for suchcommunications. These standards can include error specifications toensure quality of communication.

An STA can include at least one local clock, based on which the STAbases its communication and data processing. However, it is usually notpossible to precisely synchronize the local clocks among the severalSTAs, and therefore, each local clock can have its own error or clockdrift. In positioning or location based applications using an 802.11standard, determination of round trip time (RTT) for pre-specifiedmessages or dialogs between two STAs for example can be used to providean indication of distance between the two STAs. In a conventional methodof RTT determination, when a transmitting STA, for example, iscommunicating with a receiving STA, the error in the transmitting STA'slocal clock gets compounded with the error in the receiving STA's localclock. Thus, the RTT determination and corresponding computation ofdistance between the two STAs is imprecise and highly error prone. Theresultant error may be unacceptably high according to the wirelesscommunication standard.

SUMMARY

Exemplary embodiments are directed to systems and methods systems andmethods for obtaining synchronization at a clock maintained at awireless device having a respective clock drift. The wireless device mayobtain one or more messages indicating two or more clock errorscorresponding to two more access points. The wireless device may thenestablish communication with an access point corresponding to thesmallest clock error of the two or more clock errors by synchronizingthe clock maintained at the wireless device based on the smallest clockerror.

For example, an exemplary embodiment is directed to a wireless devicecomprising: a receiver to receive frames from the communication network;and a processor configured to: obtain two or more clock errors receivedat the receiver corresponding to two or more access points, wherein thetwo or more clock errors are broadcasted by the corresponding two ormore access points; determine a smallest clock error of the two or moreclock errors; and establish communication with an access pointcorresponding to the smallest clock error, by synchronizing a clock ofthe wireless device based on the smallest clock error.

Another exemplary embodiment is directed to a wireless devicecomprising: means for receiving two or more clock errors correspondingto two or more access points, wherein the two or more clock errors arebroadcasted by the two or more access points; means for determining asmallest clock error of the two or more clock errors; and means forestablishing communication with an access point corresponding to thesmallest clock error, by synchronizing a clock of the wireless devicebased on the smallest clock error.

Yet another exemplary embodiment is directed to a non-transitorycomputer-readable storage medium comprising program instructions, whichare executable by a processor of a wireless device to direct thewireless device to: obtain two or more clock errors corresponding to twoor more access points, wherein the two or more clock errors arebroadcasted by the two or more access points; determine a smallest clockerror of the two or more clock errors; and establish communication withan access point corresponding to the smallest clock error, bysynchronizing a clock of the wireless device based on the smallest clockerror.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings are presented to aid in the description ofembodiments of the invention and are provided solely for illustration ofthe embodiments and not limitation thereof.

FIG. 1 is a timeline of message exchanges for calculation of RTT betweentwo wireless devices in a conventional approach.

FIG. 2 illustrates an exemplary wireless communication system.

FIG. 3 illustrates an exemplary timeline of message exchanges forcalculation of RTT between two wireless devices.

FIG. 4 illustrates a flow chart of sequences in an exemplary method ofdetermining RTT between two wireless devices.

DETAILED DESCRIPTION

Aspects of the invention are disclosed in the following description andrelated drawings directed to specific embodiments of the invention.Alternate embodiments may be devised without departing from the scope ofthe invention. Additionally, well-known elements of the invention willnot be described in detail or will be omitted so as not to obscure therelevant details of the invention.

The word “exemplary” is used herein to mean “serving as an example,instance, or illustration.” Any embodiment described herein as“exemplary” is not necessarily to be construed as preferred oradvantageous over other embodiments. Likewise, the term “embodiments ofthe invention” does not require that all embodiments of the inventioninclude the discussed feature, advantage or mode of operation.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of embodiments ofthe invention. As used herein, the singular forms “a”, “an” and “the”are intended to include the plural forms as well, unless the contextclearly indicates otherwise. It will be further understood that theterms “comprises”, “comprising,”, “includes” and/or “including”, whenused herein, specify the presence of stated features, integers, steps,operations, elements, and/or components, but do not preclude thepresence or addition of one or more other features, integers, steps,operations, elements, components, and/or groups thereof.

Further, many embodiments are described in terms of sequences of actionsto be performed by, for example, elements of a computing device. It willbe recognized that various actions described herein can be performed byspecific circuits (e.g., application specific integrated circuits(ASICs)), by program instructions being executed by one or moreprocessors, or by a combination of both. Additionally, this sequence ofactions described herein can be considered to be embodied entirelywithin any form of computer readable storage medium having storedtherein a corresponding set of computer instructions that upon executionwould cause an associated processor to perform the functionalitydescribed herein. Thus, the various aspects of the invention may beembodied in a number of different forms, all of which have beencontemplated to be within the scope of the claimed subject matter. Inaddition, for each of the embodiments described herein, thecorresponding form of any such embodiments may be described herein as,for example, “logic configured to” perform the described action.

Exemplary embodiments are directed to systems and methods for reductionof clock drift in wireless communication systems. In some embodiments,wireless devices in an exemplary communication system can be configuredto determine their clock drift and announce or broadcast it to otherwireless devices or access points. Using knowledge of clock drift of thewireless devices in communication, exemplary techniques can reduce theresultant error in round trip time (RTT) calculations. In one example, areceiving device or STA can estimate its clock drift in terms of a clockdrift of a sending STA, wherein the sending STA transmits or broadcaststhe sending STA's clock drift. In another example, the converse ispossible, whereby the receiving STA transmits or broadcasts thereceiving STA's clock drift and the sending STA estimates the sendingSTA's clock drift in terms of the receiving STA's clock drift. In yetanother example, either the sending or receiving STA or any other entitysuch as an access point can obtain the clock drifts of both the sendingand the receiving STAs and using exemplary averaging functions, canobtain a highly accurate RTT between the sending and receiving STAs.

As used herein, an “access point” (or “AP”) may refer to any devicecapable of and/or configured to route, connect, share, and/or otherwiseprovide a network connection to one or more other devices, such aswireless devices or STAs. An AP may include one or more wired and/orwireless interfaces, such as one or more Ethernet interfaces and/or oneor more IEEE 802.11 interfaces, respectively, via which such aconnection may be provided. For example, an AP, such as a wirelessrouter, may include one or more Ethernet ports to connect to a localmodem or other network components (e.g., switches, gateways, etc.)and/or to connect to one or more other devices to which network accessis to be provided, as well as one or more antennas and/or wirelessnetworking cards to broadcast, transmit, and/or otherwise provide one ormore wireless signals to facilitate connectivity with one or more otherdevices.

A wireless device or STA, as described herein, can include a system,subscriber unit, subscriber station, mobile station, mobile, remotestation, remote terminal, mobile device, user terminal, terminal,wireless communication device, user agent, user device, or userequipment (UE). An STA can be a cellular telephone, a cordlesstelephone, a session initiation protocol (SIP) phone, a wireless localloop (WLL) station, a personal digital assistant (PDA), a handhelddevice having wireless connection capability, computing device, or otherprocessing device connected to a wireless modem.

In general, embodiments described herein may pertain to wirelesscommunications for devices utilizing wireless local area networks (WLAN)according to various IEEE 802.11 messaging standards. Embodiments mayimprove on acquiring a position of an STA using wireless APs, forexample, by reducing errors contributed by clock drift in the STAstowards calculation of RTTs. Rather than relying on satellite signals orassistance data from terrestrial base stations transmitting satellitegeo-positioning data, STAs may acquire their geographic locations usingwireless APs. The APs may transmit and receive wireless signalsfollowing various IEEE 802.11 standards, such as 802.11g, 802.11n,802.11ac, 802.11ad, 802.11v, etc. In some embodiments, STAs may complywith 802.11ac and 802.11v standards while transmitting or receivingsignals from multiple antennas. Some embodiments may sample timingsignals in 0.1 nanosecond (ns) increments while some embodiments maysample signals in time increments of less than 10 ns, e.g. 1.5 ns, 2 ns,0.1 ns, etc., while still complying with the standards. Embodiments mayimplement time of departure (TOD) and time of arrival (TOA) measurementsfrom 802.11 standards based on definitions that account for transmittedsignals from multiple antennas. In some embodiments, the time differencebetween the TOA and TOD may be transmitted, rather than transmitting theTOA and TOD. In some embodiments, both receiving and sending STAs maytransmit information sufficient to compute TOD and TOA measurements. Insome embodiments, these new messages may be codified in revised 802.11standards. The APs may transmit and receive timing measurements, such asTOA and TOD measurements, to and from the STAs. When an STA obtainstiming measurements from three or more APs, along with geographicalpositioning information from the APs, the STA may be able to determineits location by performing techniques similar to GPS positioning, e.g.trilateration and the like, using the multiple timing measurements. Insome cases (e.g., particularly when at least one of the STAs isstationary) the STAs may transmit and receive timing measurementsbetween one another in order to obtain the RTT and the distance betweenone another.

With reference to FIG. 1, an existing technique for computation of RTTbetween a sending STA (STA1) and a receiving STA (STA2) will bedescribed, which may be consistent for example, with specifications,diagrams, and guidelines found in some 802.11 standards such as 802.11vat page 264. Following a request from STA2 and acknowledgment from STA1,STA1 transmits timing measurement frames in overlapping pairs. The firsttiming measurement frame of a pair contains a nonzero dialog token. TheDialog Token field is a non-zero value chosen by the sending STA toidentify the timing measurement frame as the first of a pair, with thesecond or follow up timing measurement frame to be sent later (if thedialog token is zero it indicates that the timing measurement frame willnot be followed by a subsequent follow up timing measurement frame). Thefollow up timing measurement frame contains a follow up dialog token setto the value of the dialog token in the first frame of the pair. Withthe first timing measurement frame, both STAs capture timestamps. STA1captures a first time (t1) at which the timing measurement frame istransmitted. STA2 captures a second time (t2) at which the timingmeasurement frame arrives at STA2, and a third time (t3) at which theACK response is transmitted from STA2. STA1 captures a fourth time (t4)at which the ACK arrives. In the follow up timing measurement frame,STA1 transfers the timestamp values it captured (t1 and t4) to STA2.With this information, STA2 may obtain the RTT as [(t4−t1)−(t3−t2)].However, each of STA1 and STA2 are likely to have clock drifts in theirlocal clocks, which will degrade the precision of the RTT obtained asabove.

To illustrate, assume that the clock drift of a local clock in STA1 hasan error, measured as a variation in parts per million (ppm) from theexpected frequency, of ppm1.

Similarly, STA2 has a local clock drift of ppm2. With reference again toFIG. 1, the various time stamps t1-t4 will be examined in further detailwith the above assumptions. As seen, t2 is equal to t1 added to the timeof flight (where TOF is half of RTT) of the timing measurement framesent from STA1 to STA2, or in other words, t2=t1+TOF. The time t3 isobtained from adding the duration of the timing measurement frame (thisduration will be referred to herein as “M”) to the time it takes STA2 torespond to the message, also known as short inter frame spacing (SIFS),or in other words, t3=t2+M+SIFS. The time t4 is similarly obtained, ast3 added to the TOF, for the ACK from STA2 to STA1. In mathematicalterms, t4=t3+TOF. Since STA1 can vary with an error of ppm1, the timest4 and t1 computed at STA1 will be multiplied by a factor of (1+ppm1).Similarly, the times t3 and t2 computed at STA2 will be multiplied by afactor of (1+ppm2). With the above breakdown of the times t1-t4, the RTTcan be expressed in more detail with the following mathematicalequations.

$\begin{matrix}{{RTT} = {{t\; 4} - {t\; 1} - \left( {{t\; 3} - {t\; 2}} \right)}} \\{= {{\left( {{t\; 3} + {TOF} - {t\; 1}} \right)*\left( {1 + {{ppm}\; 1}} \right)} - {\left( {{t\; 2} + M + {SIFS} - {t\; 2}} \right)*\left( {1 + {{ppm}\; 2}} \right)}}} \\{= {{\left( {{t\; 2} + M + {SIFS} + {TOF} - {t\; 1}} \right)*\left( {1 + {{ppm}\; 1}} \right)} - {\left( {M + {SIFS}} \right)*\left( {1 + {{ppm}\; 2}} \right)}}} \\{= {{\left( {{t\; 1} + {TOF} + M + {SIFS} + {TOF} - {t\; 1}} \right)*\left( {1 + {{ppm}\; 1}} \right)} - {\left( {M + {SIFS}} \right)*}}} \\{\left( {1 + {{ppm}\; 2}} \right)} \\{= {{\left( {{2*{TOF}} + M + {SIFS}} \right)*\left( {1 + {{ppm}\; 1}} \right)} - {\left( {M + {SIFS}} \right)*\left( {1 + {{ppm}\; 2}} \right)}}} \\{= {{2*{TOF}*\left( {1 + {{ppm}\; 1}} \right)} + {\left( {M + {SIFS}} \right)*\left( {{{ppm}\; 1} - {{ppm}\; 2}} \right)}}}\end{matrix}$

In a practical example wherein M is 100 us, SIFS is 16 us, and each ofppm1 and ppm2 are ±25 ppm, which brings ppm1−ppm2 to 50 ppm, it is seenthat the error in RTT can be as high as 5.8 ns, which, can result in aposition uncertainty of about 1.7 meters. In positioning applications,an error of such magnitude may be unacceptably large (particularly ifSTA1 and STA2 are close by). Accordingly, exemplary embodiments includesystems and methods to reduce the error in RTT, as will be furtherexplained in detail in the following sections.

Firstly, with reference to FIG. 2, an exemplary system 200 will bedescribed, which may be configured to perform the exemplary techniquesfor reducing the effect or impact of clock error in computation of RTT.As shown, system 200 includes a transmitter system 210 and a receiversystem 250. Without loss of generality, both transmitter system 210 andreceiver system 250 may be implemented in an AP or a STA. Inillustrative examples, transmitter system 210 represents a sending STAor a first wireless device such as STA1 above, and receiver system 250represents a receiving STA such as a second wireless device or STA2above. Transmissions from transmitter system 210 to receiver system 250are referred to as a forward link or a first direction, whereastransmissions from receiver system 250 to transmitter system 210 arereferred to as a reverse link or a second direction.

It will be understood that some aspects of transmitter 210 and receiversystem 250 have been configured to implement specific features,functions, and modifications as per exemplary embodiments. For example,transmitters and receivers configured to implement the current IEEE802.11 standards typically include a plurality of data streamstransmitted by a corresponding plurality of transmitters from thetransmitter side in the forward link, which leads to ambiguities in finetiming measurement. Exemplary embodiments avoid these ambiguities andconfigure the transmitter system 210 and receiver system 250 to requireall transmissions, for example, pertaining to frames for fine timingmeasurements, to occur from a single radio frequency (RF) chain orantenna. This aspect is implemented by transmission of traffic data fromTX data processor 214 to transmitter 222 coupled to antenna 224 as willbe further explained below.

For the first direction or forward link, data streams corresponding toall transmissions from transmitter system 210 are provided as trafficdata from data source 212 to transmit (TX) data processor 214. TX dataprocessor 214 performs formatting, coding, and interleaving of thetraffic data based on an associated coding scheme. The coded trafficdata can be multiplexed with pilot data using orthogonal frequencydivision multiplexing (OFDM) techniques. The pilot data is typically aknown data pattern that is processed in a known manner and may be usedat the receiver system to estimate the channel response. The multiplexedpilot and coded traffic data are modulated (e.g. according to BPS K,QPSK, etc) to provide modulation symbols which are then provided to afirst transmitter shown as transmitter (TMTR) 222 for transmissionthrough antenna 224. The data rate, coding, and modulation can be basedon instructions stored in memory 232 and executed by processor 230.

At receiver system 250, the transmitted modulated signals are receivedby antenna 252 and the received signal is provided to receiver (RCVR)254. Receiver 254 conditions (e.g., filters, amplifies, and downconverts) the received signal, digitizes the conditioned signal toprovide samples, and further processes the samples to provide acorresponding “received” symbol stream. RX data processor 260 thenreceives and processes the received symbol stream to provide a“detected” symbol stream. RX data processor 260 then demodulates,de-interleaves, and decodes the detected symbol stream to recover thetraffic data. The processing by RX data processor 260 is complementaryto that performed by TX data processor 214 at transmitter system 210.

Coming now to the second direction or reverse link, processor 270 atreceiver system 250 periodically determines one of several pre-codingmatrices stored in memory 272 and formulates a reverse link messagecomprising a corresponding matrix index portion and rank value portion.The reverse link transmissions or reverse link message may comprisevarious types of information regarding the communication link and/or thereceived traffic data. The reverse link message is processed by TX dataprocessor 238, which also receives the traffic data from data source236, modulated by modulator 280, conditioned by transmitter (TMTR) 254,and transmitted back to transmitter system 210. For the reversetransmission, the transmitter TMTR in receiver system 250 is shown in asame module as RCVR 254, sharing antenna 252, and similarly, a firstreceiver or receiver RCVR 222 in transmitter system 210 is shown in asame module as TMTR 222, sharing antenna 224.

At transmitter system 210, the modulated signals from receiver system250 are received by antenna 224, conditioned by receiver 222,demodulated by demodulator 240, and processed by RX data processor 242to extract the reverse link message. Processor 230 then determines whichpre-coding matrix to use, from a plurality of pre-coding matrices storedin memory 232, and then processes the extracted message. While exemplarysystem 200 has been shown and described with regard to the illustratedfeatures or functional blocks of FIG. 2, it will be understood that thefunctionalities of the various functional blocks can be combined oraltered to suit particular implementations. For example, aspects relatedto TX data processor 214 and processor 230 of transmitter 210 may becombined and implemented in a first processor. Similar suchmodifications will be apparent to one skilled in the art.

Moreover, it will be understood that a further detailed description ofthe functionalities of the above description provides only a basicdescription of the functionality of the various above-mentionedcomponents of system 200 have been omitted herein for the sake ofclarity. A skilled person will be able to apply the disclosed techniquesfor fine timing measurement, as it relates to reducing the effect orimpact of clock error in computation of RTT, to any other similartransmitter and receiver structure, without departing from the scope ofthis disclosure.

With reference now to FIG. 3, an exemplary embodiment pertaining toaccurate measurement of RTT will be explained in further detail. In FIG.3, STA1 may be configured according to transmitter system 210 of FIG. 2,while STA2 may be configured according to receiver system 250 of FIG. 2.In some embodiments, the system of FIG. 3 is configured for “fine timingmeasurement,” whereby an accurate measurement of RTT between STA1 andSTA2 may be obtained. As it pertains to this disclosure, fine timingmeasurement includes modifications to the current 802.11v standards. Thecurrent IEEE 802.11v standard can be used for synchronization purposes,as well as, for location or positioning purposes. With some of themodifications correspond to fine timing measurement, which have beenshown in TABLE 1 below, the new IEEE 802.11 rev mc standard can be usedfor location purposes across various 802.11 standards (e.g., 802.11g,802.11n, 802.11ac, 802.11ad, 802.11v, etc).

Table 1, as it pertains to aspects of the new IEEE 802.11 rev mcstandard, relevant to exemplary embodiments, is shown below:

TABLE 1 Fine Timing Measurement The current resolution of 10 ns for802.11 v is appropriate for signals that have CH_BANDWIDTH <100 MHz. Thesignals of both 802.11ac (160 MHz) and 802.11ad (>1.8 GHz) have muchgreater requirements. To be future proof, a proposed modificationaccording to fine timing measurement includes modifying the currentresolution to 0.1 ns. Current timing measurement frames and timingmeasurement request frames are class 3 frames that require bothauthentication and association. This is unnecessary. Accordingly, in thefine timing measurement, a modification includes adding new publicaction frames that have the same functionality as existing 802.11 vframes, and since they are public action, these frames are class 1frames. Class 1 frames do not require either authentication orassociation. The amount of overhead is minimal in typical scenarios. Forexample, when doing packet exchanges with 3 APs every 5 s, assuming 300clients in the AP neighborhood, transmitting at a rate of 36 mbps, theamount of overhead is 300 * 3 * (68 us + 72 us + 72 us)/5 s = 3.8%. Thecurrent wording in section 8.5.15.3 of IEEE 802.11 v (Timing MeasurementFrame Format) has a multi-antenna ambiguity. A proposed modificationaccording to fine timing measurement includes removing this ambiguity inthe new fine timing measurement frames and requiring all transmissionsto occur from a single RF chain. This modification has been illustratedin the exemplary system 200 of FIG. 2.

While Table 1 above summarizes relevant modifications to the currentIEEE 802.11 standards to obtain the proposed new IEEE 802.11 rev mcstandard, particularly as it relates to fine timing measurement inexemplary embodiments, further details of the proposed new IEEE 802.11rev mc standard, in general, can be found in U.S. ProvisionalApplication No. 61/721,437, entitled “METHODS FOR PRECISE LOCATIONDETERMINATIONS AND WIRELESS TRANSMISSIONS IN 802.11 STANDARDS,” filedNov. 1, 2012, assigned to the assignee hereof, and incorporated byreference herein.

More particularly, with regard to the disclosed embodiments, fine timingmeasurement allows, for example, STA2 to accurately measure the RTTbetween STA2 and STA1. With the regular transfer of fine timingmeasurement frames it is possible for the receiving STA (STA2) to trackchanges in its relative location with other STAs in the environment.

As can be recognized, the timeline related to message transfers betweenSTA1 and STA2 includes additional elements than those that weredescribed with regard to the conventional approach in FIG. 1. Moreparticularly, in the exemplary aspects of FIG. 3, the request from STA2indicates that a two-sided exchange is turned on. This saves anadditional request-acknowledgment routine between STA1 and STA2,however, it will be understood that alternative embodiments may beconfigured without the two-sided exchange, whereby the same result canbe obtained, albeit through additional steps of request-acknowledgement.It will be understood that although the sequence of actions/routineshave been illustrated in an exemplary order in FIG. 3, there is norequirement for embodiments to adopt the same sequence of actions. Forexample, even though an action may be described as following or beingperformed subsequent to a previous action, there is no requirement thatan action and a previous action must be separated in time, as it ispossible that some of the actions described in the timeline of FIG. 3may be combined into a single transaction or performed simultaneously orconcurrently, without diverging from the scope of the embodiments.

Proceeding with the timeline of FIG. 3, subsequent to the two-sidedrequest from STA2 and acknowledgment from STA1, STA1 transmits timingmeasurement frames in overlapping pairs. The next few message transfersare similar to the conventional techniques, where a first RTT iscalculated in a first direction. A first clock error, for examplerelated to STA1, may be associated with the first RTT. Without loss ofgenerality, the first direction relates to a round trip of timingmeasurement frames corresponding to a first frame, for example, which istransmitted from STA1 to STA2, followed by an acknowledgement of thefirst frame transmitted from STA2 to STA1. Thus, the first RTT in thefirst direction can be computed based on a first set of one or moremessages, where the messages comprise the transmission (e.g., firsttransmission) of the first frame and reception of a correspondingacknowledgment (e.g., first acknowledgment) of the first frame. In moredetail, as previously explained, the first RTT is based at least in parton the first and fourth times, t1 and t4, which may be obtained at STA1related to RTT measurement of the first frame, for example. Once again,times t1 and t4 may be transferred to STA2, where STA2 can compute afirst RTT in a first direction, or simply, “RTT” herein, in similarmanner as explained above with respect to FIG. 1, i.e. by computing[(t4−t1)−(t3−t2)]. In some cases, STA2 can transfer the computed RTT toSTA1.

Once STA2 receives t1 and t4 (and further, acknowledges this receiptand/or sends the computed RTT to STA1 in some cases), exemplaryembodiments depart from conventional techniques, in that a secondprotocol for obtaining a second set of measurements, for a second RTT ina second direction (herein, RTT′), between STA2 and STA1 is commenced,where the second direction may be considered to be the reverse of thefirst direction. A second clock error, for example, corresponding to thesecond wireless device STA2 may be associated with the second RTT.

This second RTT in the second direction, or RTT′, is computed based on asecond set of one or more messages pertaining to transmission of asecond frame and reception of an acknowledgment of the second frame.More specifically, STA2 transmits (e.g., in a second transmission) atiming measurement frame, pertaining to the second frame, for example,to STA1 at a fifth time (t1′). STA1 captures a sixth time (t2′) at whichthe second frame arrives at STA1 and a seventh time (t3′) at which theacknowledgement of the second frame (e.g., a second acknowledgment orACK response), is transmitted from STA1. STA2 captures an eighth time(t4′) at which the ACK is received at STA2. In the follow up timingmeasurement frame, STA2 transfers the timestamp values it captured (t1′and t4′) to STA1. With this information, STA1 may be able to determinethe second RTT as a difference between the eighth time and the fifthtime, minus the difference between the seventh time and the sixth time,represented by the equation: RTT′=[(t4′−t1′)−(t3′−t2′)]. In oneembodiment, as illustrated, STA1 can transfer the computed RTT′ to STA2,whereby STA2 will possess both RTT and RTT′. Using this information,STA2 may obtain an average of RTT and RTT′, denoted as RTT″, which canadvantageously lead to a significant reduction in error caused by clockdrift. More specifically, an average clock error associated with theaverage RTT, (RTT″) is lower error that than the first clock errorassociated with the first RTT (RTT) and the second clock errorassociated with the second RTT (RTT′).

Alternatively, if STA2 had previously transferred RTT to STA1 asmentioned previously as an option for some embodiments, and since STA1already possesses RTT′, STA1 may also perform computations to obtain theaverage RTT″ of RTT and RTT′. For the sake of explanation of anillustrative embodiment, the case where RTT″ is calculated at STA2 ischosen below, while it will be kept in mind that this is a non-limitingillustration, and the below computation of RTT″ may be performed atSTA1, or for that matter, at any other entity, such as an access pointto which the necessary time stamps and/or round trip time values aretransferred from STA1 and STA2.

For the sake of brevity, the calculation of RTT′ is provided with regardto an exemplary embodiment, while it is assumed that the calculation ofRTT is similar to that in the conventional approach already described.It will be understood that STA1 and STA2 are assumed to be preferablystationary or non-mobile (or the distance between them remainsunaltered) for the below calculations, so the TOF values do not change.Moreover, if identical systems or chipsets are used in the configurationof STA1 and STA2, which is often the case for handsets, the SIFS valuesfor STA1 and STA2 will also be the same. With these assumptions, andkeeping in mind that once again, STA1 is assumed to have a clock driftwith an error of ppm1 and STA2 has a similar error of ppm2, thecorresponding, RTT′ is obtained as follows.

$\begin{matrix}{{RTT}^{\prime} = {{t\; 4^{\prime}} - {t\; 1^{\prime}} - \left( {{t\; 3^{\prime}} - {t\; 2^{\prime}}} \right)}} \\{= {{\left( {{t\; 3^{\prime}} + {TOF} - {t\; 1^{\prime}}} \right)*\left( {1 + {{ppm}\; 2}} \right)} - {\left( {{t\; 2^{\prime}} + M + {SIFS} - {t\; 2^{\prime}}} \right)*}}} \\{\left( {1 + {{ppm}\; 1}} \right)} \\{= {{\left( {{t\; 2^{\prime}} + M + {SIFS} + {TOF} - {t\; 1^{\prime}}} \right)*\left( {1 + {{ppm}\; 2}} \right)} - {\left( {M + {SIFS}} \right)*}}} \\{\left( {1 + {{ppm}\; 1}} \right)} \\{= {{\left( {{t\; 1^{\prime}} + {TOF} + M + {SIFS} + {TOF} - {t\; 1^{\prime}}} \right)*\left( {1 + {{ppm}\; 2}} \right)} - {\left( {M + {SIFS}} \right)*}}} \\{\left( {1 + {{ppm}\; 1}} \right)} \\{= {{\left( {{2*{TOF}} + M + {SIFS}} \right)*\left( {1 + {{ppm}\; 2}} \right)} - {\left( {M + {SIFS}} \right)*\left( {1 + {{ppm}\; 1}} \right)}}} \\{= {{2*{TOF}*\left( {1 + {{ppm}\; 2}} \right)} + {\left( {M + {SIFS}} \right)*\left( {{{ppm}\; 2} - {{ppm}\; 1}} \right)}}}\end{matrix}$

As will be recalled, RTT is obtained asRTT=2*TOF*(1+ppm1)+(M+SIFS)*(ppm1−ppm2). Accordingly, averaging RTT andRTT′ will result in an average, represented by

$\begin{matrix}\begin{matrix}{{RTT}^{''} = {2{TOF}*\left( {1 + \frac{{{ppm}\; 1} + {{ppm}\; 2}}{2}} \right)}} \\{= {{2{TOF}} + {{TOF}*\left( {{{ppm}\; 1} + {{ppm}\; 2}} \right)}}}\end{matrix} & \;\end{matrix}$

With the previous assumptions intact, i.e. M is 100 us, SIFS is 16 us,and each of ppm1 and ppm2 are ±25 ppm, it is seen that the error in RTT″corresponds to the factor TOF*(ppm1+ppm2) in the RTT″ expression, which,when STA1 and STA2 are 100 meters apart equates to100/3e8*1e9*50e⁻⁶=0.0167 ns. Compared to the 5.8 ns error in theconventional approach explained with regard to FIG. 1, it is seen thatin exemplary embodiments, the error is reduced by a factor of 348, whichwill be recognized as a substantial reduction by those skilled in theart. Accordingly, by obtaining round trip time values using time framemeasurement transfers in both directions between STA1 and STA2, andaveraging them out, exemplary embodiments can minimize the impact ofclock drift of the two STAs in the calculation of RTT, and thus improvethe precision of the RTT.

While in the above illustrated example, STA1 computed RTT′ and sent itto STA2 for the averaging functions, as previously explained,alternative embodiments are possible, wherein RTT computed at STA2 issent to STA1; and since STA1 is already configured to compute RTT′, STA1may complete the steps for calculating the averaging function todetermine RTT″. As another alternative, both STA1 and STA2 may transfersome or all of the time stamps and round trip time computations toanother entity such as, a server, a location determining entity, or anAP to determine RTT″. For example, STA2 may compute and send RTT to anAP, and STA1 may compute and send RTT′ to the AP, whereby the AP cancompute RTT″. Skilled persons will recognize various other alternativeswhich may be possible on similar lines, while keeping mind thatobtaining RTT in both directions and averaging them can significantlyreduce impact of clock drift in RTT computation.

Additionally, it will be noted that with fine timing measurements andcorresponding timestamp capture described above, with regard to thecomputation of RTT for example, t1 and t3 correspond to the point intime at which the start of the preamble for the transmitted frameappears at the transmit antenna port (e.g. of antenna 224 coupled totransmitter TMTR 222, where STA1 is implemented as transmitter system210). An implementation may capture a timestamp during the transmitprocessing earlier or later than the point at which it actually occursand offset the value to compensate for the time difference.Correspondingly, t2 and t4 correspond to the point in time at which thestart of the preamble for the incoming frame arrives at the receiveantenna port (e.g. of antenna 252 coupled to receiver RCVR 254, whereSTA2 is implemented as receiver system 250). Because detecting the frameand synchronizing with its logical structure incurs a time delay, animplementation determines when the start of the preamble for theincoming frame arrived at the receive antenna port by capturing atimestamp some time after it occurred and compensating for the delay bysubtracting an offset from the captured value.

Yet another embodiment will now be described, wherein, instead ofaveraging RTT and RTT′ as above to obtain RTT″, one of the two STAs, saySTA2 can lock its clock on to that of STA1, so that the factor (1+ppm2)for STA2 would take the form of (1+ppm1−residual_ppm), whereinresidual_ppm is a differential ppm2 remaining after STA2 has locked onto the clock of STA1. As one of skill in the art will understand, STA2can lock its clock on to STA1's clock, for example, in a coarse mannerduring Legacy Short Training Field (L-STF) portion of the preamble of anIEEE 802.11 frame, and prior to the Legacy Long Training Field (L-LTF)portion. In this embodiment, the additional steps of computing RTT′ andRTT″ are not required. Therefore, computation of RTT which waspreviously described, will be suitably modified, as follows:

RTT=2*TOF*(1+ppm1)+(M+SIFS)*(ppm1−ppm2)=2*TOF*(1+ppm1)+(M+SIFS)*(residual_ppm)

In an illustrative example, if residual_ppm is assumed to be on theorder of 1 ppm, which corresponds to practical applications, then theerror in RTT is reduced to 116 us*1e⁻⁶=0.116 ns=0.03 m, which is lowerthan the error in conventional approaches by a factor of about 50 (withthe same assumptions as above, i.e. M is 100 us, SIFS is 16 us, each ofppm1 and ppm2 are ±25 ppm, and STA1 and STA2 are 100 meters).

In some embodiments, where the communication may relate to that betweenan AP and an STA (i.e., instead of between two STAs, STA1 and STA2 asdiscussed above), and a wireless communication system comprises severalAPs that are location enabled, then performance of the embodiment can beimproved if the APs are configured to advertise or broadcast theirmaximum clock errors or ppm values. In this manner, all the STAs in thecommunication system may lock on to the AP with the lowest clock error.Moreover, in this example, the AP with the smallest clock error canserve as a master for its neighbors. Thus a wireless device such as STA1or STA2, for example, may receive two or more clock errors transmittedby two or more access points, and determine a smallest clock error ofthe two or more clock errors. The wireless device may then establishcommunication with an access point corresponding to the smallest clockerror, by synchronizing a clock of the wireless device based on thesmallest clock error. The advertisement of the clock errors (e.g., inppm) can be broadcast in a beacon or in a handshake process, such asfine timing measurement request exchange, which would normally happenbefore fine timing measurement exchange is performed. Further, thewireless device may also communicate to a smallest clock error AP whichcorresponds to the smallest clock error that the smallest clock error APhas the smallest clock error. Based on this, the smallest clock error APmay designate or establish itself as a master AP, and advertise itsstatus as the master AP to neighboring APs.

It will be appreciated that embodiments include various methods forperforming the processes, functions and/or algorithms disclosed herein.For example, as illustrated in FIG. 4, an embodiment can include amethod of method of calculating round trip time (RTT), at a firstwireless device, from the first wireless device (e.g., STA1) to a secondwireless device (e.g., STA2), the method comprising: receiving acalculation of a first RTT in a first direction (e.g., receiving RTTfrom STA2), based on a first set of one or more messages, wherein thefirst set of one or more messages comprises a first frame transmitted bythe first wireless device in the first direction—Block 402; calculatinga second RTT in a second direction (e.g. RTT′), based on a second set ofone or more messages, wherein the second set of one or more messagescomprises a second frame transmitted by the second wireless device inthe second direction—Block 404; and calculating an average RTT (e.g.,RTT″), wherein the average RTT is based on the first RTT and the secondRTT—Block 406.

In some aspects, the first wireless device comprises a first clock errorrelated to determination of the second RTT in the second direction, andthe first RTT can be received from a second wireless device in the firstdirection, where the second wireless device comprises a second clockerror. The average RTT has a lower error that than the first RTT or thesecond RTT. The first and second wireless devices may be mobile devices,or the first wireless device may be an access point, while the secondwireless device is a mobile device or access terminal. Additionally, thefirst and second set of messages may be based on an IEEE 802.11standard, and particularly, may be based on fine timing measurement.

Those of skill in the art will appreciate that information and signalsmay be represented using any of a variety of different technologies andtechniques. For example, data, instructions, commands, information,signals, bits, symbols, and chips that may be referenced throughout theabove description may be represented by voltages, currents,electromagnetic waves, magnetic fields or particles, optical fields orparticles, or any combination thereof.

Further, those of skill in the art will appreciate that the variousillustrative logical blocks, modules, circuits, and algorithm stepsdescribed in connection with the embodiments disclosed herein may beimplemented as electronic hardware, computer software, or combinationsof both. To clearly illustrate this interchangeability of hardware andsoftware, various illustrative components, blocks, modules, circuits,and steps have been described above generally in terms of theirfunctionality. Whether such functionality is implemented as hardware orsoftware depends upon the particular application and design constraintsimposed on the overall system. Skilled artisans may implement thedescribed functionality in varying ways for each particular application,but such implementation decisions should not be interpreted as causing adeparture from the scope of the present invention.

The methods, sequences and/or algorithms described in connection withthe embodiments disclosed herein may be embodied directly in hardware,in a software module executed by a processor, or in a combination of thetwo. A software module may reside in RAM memory, flash memory, ROMmemory, EPROM memory, EEPROM memory, registers, hard disk, a removabledisk, a CD-ROM, or any other form of storage medium known in the art. Anexemplary storage medium is coupled to the processor such that theprocessor can read information from, and write information to, thestorage medium. In the alternative, the storage medium may be integralto the processor.

Accordingly, an embodiment of the invention can include a computerreadable media embodying a method for reducing the impact of clockerror/drift in determining RTT between two wireless devices.Accordingly, the invention is not limited to illustrated examples andany means for performing the functionality described herein are includedin embodiments of the invention.

While the foregoing disclosure shows illustrative embodiments of theinvention, it should be noted that various changes and modificationscould be made herein without departing from the scope of the inventionas defined by the appended claims. The functions, steps and/or actionsof the method claims in accordance with the embodiments of the inventiondescribed herein need not be performed in any particular order.Furthermore, although elements of the invention may be described orclaimed in the singular, the plural is contemplated unless limitation tothe singular is explicitly stated.

What is claimed is:
 1. A first wireless device, the first wirelessdevice comprising: a receiver to receive frames from the communicationnetwork; and a processor configured to: obtain two or more clock errorsreceived at the receiver corresponding to two or more access points,wherein the two or more clock errors are broadcasted by thecorresponding two or more access points; determine a smallest clockerror of the two or more clock errors; and establish communication withan access point corresponding to the smallest clock error, bysynchronizing a clock of the wireless device based on the smallest clockerror.
 2. The first wireless device of claim 1, wherein the two or moreclock errors are obtained in a fine timing measurement request exchangebetween the first wireless device and the two or more access points. 3.The first wireless device of claim 1, wherein the two or more clockerrors comprise maximum clock errors of the two or more access points.4. The first wireless device of claim 1, wherein the access pointcorresponding to the smallest clock error is configured to establishitself as a master access point of the two or more access points.
 5. Thefirst wireless device of claim 1, wherein the two or more clock errorsare broadcasted in one or more beacons.
 6. The first wireless device ofclaim 1, wherein the processor is further configured to: compute around-trip time of a message exchange with a second wireless devicebased, at least in part, on the synchronized clock of the first wirelessdevice.
 7. The first wireless device of claim 1, wherein the two or moreclock errors are expressed as parts per million (ppm).
 8. A firstwireless device, the first wireless device comprising: means forreceiving two or more clock errors corresponding to two or more accesspoints, wherein the two or more clock errors are broadcasted by the twoor more access points; means for determining a smallest clock error ofthe two or more clock errors; and means for establishing communicationwith an access point corresponding to the smallest clock error, bysynchronizing a clock of the first wireless device based on the smallestclock error.
 9. The first wireless device of claim 8, wherein the two ormore clock errors are obtained in a fine timing measurement requestexchange between the first wireless device and the two or more accesspoints.
 10. The first wireless device of claim 8, wherein the two ormore clock errors comprise maximum clock errors of the two or moreaccess points.
 11. The first wireless device of claim 8, wherein theaccess point corresponding to the smallest clock error is configured toestablish itself as a master access point of the two or more accesspoints.
 12. The first wireless device of claim 8, wherein the two ormore clock errors are broadcasted in one or more beacons.
 13. The firstwireless device of claim 8, wherein the processor is further configuredto: compute a round-trip time of a message exchange with a secondwireless device based, at least in part, on the synchronized clock ofthe first wireless device.
 14. The first wireless device of claim 8,wherein the two or more clock errors are expressed as parts per million(ppm).
 15. A non-transitory computer-readable storage medium comprisingprogram instructions, which are executable by a processor of a firstwireless device to direct the first wireless device to: obtain two ormore clock errors corresponding to two or more access points, whereinthe two or more clock errors are broadcasted by the two or more accesspoints; determine a smallest clock error of the two or more clockerrors; and establish communication with an access point correspondingto the smallest clock error, by synchronizing a clock of the firstwireless device based on the smallest clock error.
 16. Thenon-transitory computer-readable storage medium of claim 15, wherein thetwo or more clock errors are obtained in a fine timing measurementrequest exchange between the first wireless device and the two or moreaccess points.
 17. The non-transitory computer-readable storage mediumof 15, wherein the two or more clock errors comprise maximum clockerrors of the two or more access points.
 18. The non-transitorycomputer-readable storage medium of claim 15, wherein the access pointcorresponding to the smallest clock error is configured to establishitself as a master access point of the two or more access points. 19.The non-transitory computer-readable storage medium of claim 15, whereinthe two or more clock errors are broadcasted in one or more beacons. 20.The non-transitory computer-readable storage medium of claim 15, whereinthe program instructions are implementable by the processor to furtherdirect the first wireless device to: compute a round-trip time of amessage exchange with a second wireless device based, at least in part,on the synchronized clock of the first wireless device.